ClientAccntStrategyMap
METADATA
Attribute | Value |
---|---|
Topic | 1800-client-config |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
accnt | VARCHAR(16) | PRI | '' | |
strategy | VARCHAR(36) | PRI | '' | |
riskUser | VARCHAR(25) | PRI | '' | |
clientFirm | VARCHAR(16) | PRI | '' | SR assigned client firm acronym |
accntID | BIGINT | 0 | ||
strategyID | BIGINT | 0 | ||
accntName | TINYTEXT | '' | ||
userEmail | TINYTEXT | '' | ||
userPhone | VARCHAR(24) | '' | ||
legalEntity | TINYTEXT | '' | ||
defaultStrategy | enum - YesNo | 'No' | if yes UI tools will ignore saved selection and populate strategy dropdown with this item | |
modifiedBy | VARCHAR(24) | '' | user who last modified this record | |
modifiedIn | enum - SysEnvironment | 'None' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of last modification |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
accnt | 1 |
strategy | 2 |
riskUser | 3 |
clientFirm | 4 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgClientAccntStrategyMap` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`strategy` VARCHAR(36) NOT NULL DEFAULT '',
`riskUser` VARCHAR(25) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm acronym',
`accntID` BIGINT NOT NULL DEFAULT 0,
`strategyID` BIGINT NOT NULL DEFAULT 0,
`accntName` TINYTEXT NOT NULL DEFAULT '',
`userEmail` TINYTEXT NOT NULL DEFAULT '',
`userPhone` VARCHAR(24) NOT NULL DEFAULT '',
`legalEntity` TINYTEXT NOT NULL DEFAULT '',
`defaultStrategy` ENUM('None','Yes','No') NOT NULL DEFAULT 'No' COMMENT 'if yes, UI tools will ignore saved selection and populate strategy dropdown with this item',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`accnt`,`strategy`,`riskUser`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`strategy`,
`riskUser`,
`clientFirm`,
`accntID`,
`strategyID`,
`accntName`,
`userEmail`,
`userPhone`,
`legalEntity`,
`defaultStrategy`,
`timestamp`
FROM `SRControl`.`MsgClientAccntStrategyMap`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(36) */
`strategy` = 'Example_strategy'
AND
/* Replace with a VARCHAR(25) */
`riskUser` = 'Example_riskUser'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgClientAccntStrategyMap`
SET
/* Replace with a BIGINT */
`accntID` = 1234567890,
/* Replace with a BIGINT */
`strategyID` = 1234567890,
/* Replace with a TINYTEXT */
`accntName` = 'dummy tiny text',
/* Replace with a TINYTEXT */
`userEmail` = 'dummy tiny text',
/* Replace with a VARCHAR(24) */
`userPhone` = 'Example_userPhone',
/* Replace with a TINYTEXT */
`legalEntity` = 'dummy tiny text',
/* Replace with a ENUM('None','Yes','No') */
`defaultStrategy` = 'No',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(36) */
`strategy` = 'Example_strategy'
AND
/* Replace with a VARCHAR(25) */
`riskUser` = 'Example_riskUser'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgClientAccntStrategyMap`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a VARCHAR(36) */
`strategy`,
/* Replace with a VARCHAR(25) */
`riskUser`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a BIGINT */
`accntID`,
/* Replace with a BIGINT */
`strategyID`,
/* Replace with a TINYTEXT */
`accntName`,
/* Replace with a TINYTEXT */
`userEmail`,
/* Replace with a VARCHAR(24) */
`userPhone`,
/* Replace with a TINYTEXT */
`legalEntity`,
/* Replace with a ENUM('None','Yes','No') */
`defaultStrategy`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_accnt',
'Example_strategy',
'Example_riskUser',
'Example_clientFirm',
1234567890,
1234567890,
'dummy tiny text',
'dummy tiny text',
'Example_userPhone',
'dummy tiny text',
'No',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgClientAccntStrategyMap`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(36) */
`strategy` = 'Example_strategy'
AND
/* Replace with a VARCHAR(25) */
`riskUser` = 'Example_riskUser'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='ClientAccntStrategyMap' ORDER BY ordinal_position ASC;